home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000153_icon-group-sender _Mon Jun 19 12:22:29 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
4KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA10487
for icon-group-addresses; Mon, 19 Jun 2000 12:20:34 -0700 (MST)
Message-Id: <200006191920.MAA10487@baskerville.CS.Arizona.EDU>
From: Lloyd Uhler <luhler@excel.com>
To: "'icon-group@cs.arizona.edu'" <icon-group@optima.CS.Arizona.EDU>
Subject: RE: Questions on ICON
Date: Mon, 19 Jun 2000 10:10:01 -0500
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Any fix for textbox input in VIB?
Thanks.
> -----Original Message-----
> From: Lloyd Uhler
> Sent: Wednesday, April 26, 2000 8:52 AM
> To: 'icon-group@cs.arizona.edu'
> Subject: Questions on ICON
>
> 1) For Version 9.3.1 on WIN NT and WIN 98, textbox input does not work for
> VIB generated code as follows:
>
> ##########################################################################
> ##
> #
> # File: C:\Icon9.3\vib_tst.icn
> #
> # Subject: Program to ...
> #
> # Author:
> #
> # Date: January 21, 1999
> #
> ##########################################################################
> ##
> #
> #
> #
> ##########################################################################
> ##
> #
> # Requires:
> #
> ##########################################################################
> ##
> #
> # Links: vsetup
> #
> ##########################################################################
> ##
>
> # This vib interface specification is a working program that responds
> # to vidget events by printing messages. Use a text editor to replace
> # this skeletal program with your own code. Retain the vib section at
> # the end and use vib to make any changes to the interface.
>
> link vsetup
>
> procedure main(args)
> local vidgets, root, paused
>
> (WOpen ! ui_atts()) | stop("can't open window")
> vidgets := ui() # set up vidgets
> root := vidgets["root"]
>
> paused := 1 # flag no work to do
> repeat {
> # handle any events that are available, or
> # wait for events if there is no other work to do
> while (*Pending() > 0) | \paused do {
> ProcessEvent(root, QuitCheck)
> }
> # if <paused> is set null, code can be added here
> # to perform useful work between checks for input
> }
> end
>
> procedure text_input_cb1(vidget, value)
> # write("value = ", value)
> return
> end
>
> #===<<vib:begin>>=== modify using vib; do not remove this marker line
> procedure ui_atts()
> return ["size=600,378", "bg=#C0C0C0"]
> end
>
> procedure ui(win, cbk)
> return vsetup(win, cbk,
> [":Sizer:::0,0,600,378:",],
> ["button1:Button:regular::270,349,32,20:OK",button_cb1],
> ["text_input1:Text::46:95,111,367,20:Enter Your
> Name:\\=",text_input_cb1],
> )
> end
> #===<<vib:end>>=== end of section maintained by vib
> procedure button_cb1(vidget, value)
> #
>
> # write("button_cb1")
> #
> # This does not work with the original viface module
> # The local one has been revised to detect Window closure
> # and do this without error. This will return to the statement
> # after GetEvents. The program can then process or do what it
> # needs with the results for the GUI data capture. Data values
> # can be inserted into global variables so they are available
> # to the rest of the program.
> #
> # WClose( &window )
> return
> end
>
> 2) There seems to be no way to gather a set of file names from a specified
> directory:
> (System & popen do not work the same as command-line version of ICON
> (Nticont, Nticonx)).
> (F.F and pipe.001 are empty)
>
> link graphics, dialog, popen, xio
>
> procedure main()
> #
> #
> # the 45 is the width
> #
> txt := TextDialog("Specify Directory Path:", "Path", "C:\\temp" , 45)
>
> Path := dialog_value[1]
> write("Path = ", Path)
>
> cmd := "Dir /b/l "
> #
> # See if F.F Generated fro BAT File
> #
> system( "CALL C:\\ICON9.3\\WDIR.CMD" || Path )
> #
> # Try popen to get file of file names
> #
> fin := popen( cmd || Path, "r")
> while line := trim(read(fin)) do write(line)
>
> pclose(fin)
>
> end
>
> REM
> REM Wdir.BAT
> REM
> REM Purpose: Directory Listing
> REM
> DIR /b/l %1 > F.F